﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcApplication2.Models.DTO;
using MvcApplication2.Models;
using MvcApplication2.Models.Services;

namespace MvcApplication2.Controllers
{
    public static class MasterController
    {
        public static List<LoaiSanPham> LayDanhSachLoaiSanPham()
        {
            return LoaiSanPhamService.LayDanhSachLoaiSanPham();
        }

        public static int? LayTongDiemThuong(string username)
        {
            if (!string.IsNullOrEmpty(username))
                return NguoiDungService.GetByUsername(username).DiemThuong;
            return null;
        }
    }
}